<%@ include file="/common/taglibs.jsp"%>

<title><fmt:message key="calendarWorktypeDetail.title"/></title>
<content tag="heading"><fmt:message key="calendarWorktypeDetail.heading"/></content>

<html:form action="saveCalendarWorktype" method="post" styleId="calendarWorktypeForm" onsubmit="return validateCalendarWorktypeForm(this)">
<ul>

<html:hidden property="id"/>

    <li>
        <generalsetting:label styleClass="desc" key="calendarWorktypeForm.calendarDate"/>
        <html:errors property="calendarDate"/>
        <html:text property="calendarDate" styleId="calendarDate" styleClass="text medium"/>
            <A HREF="#" onclick="cal1.select(document.forms[0].calendarDate,'anchor1','yyyy/MM/dd');return false;"
                     title = "cal1.select(document.forms[0].calendarDate, 'anchor1', 'yyyy/MM/dd'); return false;"
                     id="anchor1" name="anchor1">                
            <fmt:message key="button.calendar"/>            
            </A> 
    </li>

    <li>
        <generalsetting:label styleClass="desc" key="calendarWorktypeForm.workTypeId"/>
        <!-- html:errors property="workTypeId"/-->
        <!-- html:text property="workTypeId" styleId="workTypeId" styleClass="text medium"/-->
            <html:select property="workTypeId">
            	<html:options collection="worktypes" property="workTypeId" labelProperty="workTypeName"/>
            </html:select>
    </li>

    <li class="buttonBar bottom">
        <html:submit styleClass="button" property="method.save" onclick="bCancel=false">
            <fmt:message key="button.save"/>
        </html:submit>

        <html:submit styleClass="button" property="method.delete" onclick="bCancel=true; return confirmDelete('CalendarWorktype')">
            <fmt:message key="button.delete"/>
        </html:submit>

        <html:cancel styleClass="button" onclick="bCancel=true">
            <fmt:message key="button.cancel"/>
        </html:cancel>
    </li>
</ul>
</html:form>
<SCRIPT LANGUAGE="JavaScript" SRC="scripts/CalendarPopup.js"></SCRIPT>
<script type="text/javascript">
    var cal1 = new CalendarPopup();
//cal1.showNavigationDropdowns();
    cal1.showYearNavigation(); 
	cal1.showYearNavigationInput();
    Form.focusFirstElement($("calendarWorktypeForm"));
</script>

<html:javascript formName="calendarWorktypeForm" cdata="false" dynamicJavascript="true" staticJavascript="false"/>
<script type="text/javascript" src="<html:rewrite page="/scripts/validator.jsp"/>"></script>
